if whichArrow is up then put halftoneEffect - 1 into newEffect
else if whichArrow is down then put halftoneEffect + 1 into newEffect
else pass arrowKey
if the shiftKey is down then put 1 into newEffect
if newEffect < 1 then put 30 into newEffect
if newEffect > 30 then put 1 into newEffect
set cursor to watch
setHalftoneEffect newEffect
put card field "Effect" of card "Effects"
halftone
end arrowKey
on deleteCard
answer "You can't delete the Halftone Card!"
set cantDelete of this card to true
end deleteCard
on doMenu what
global brightness,contrast,oldBrightness,oldContrast
if what is not "Undo" then pass doMenu
if the tool is not "browse tool" then pass doMenu
put brightness into temp
put oldBrightness into brightness
put temp into oldBrightness
put contrast into temp
put oldContrast into contrast
put temp into oldContrast
halftone
end doMenu
on enterKey
set hilite of button "Save" to true
saveCard
set hilite of button "Save" to false
end enterKey
on equalize
checkError hyperScan("Equalize")
auto
end equalize
on histo
global brightness,contrast,oldBrightness,oldContrast
put brightness into oldBrightness
put contrast into oldContrast
checkError hyperScan("PlotHistogram")
if brightness <> oldBrightness or contrast <> oldContrast
then halftone
end histo
on mouseDown
global brightness,contrast,oldBrightness,oldContrast
put brightness into oldBrightness
put contrast into oldContrast
put the clickH into contrast
put 171 - the clickV into brightness
show button "Cross" at contrast,171-brightness
repeat until the mouse is up
put the mouseH into contrast
put 171 - the mouseV into brightness
show button "Cross" at contrast,171-brightness
end repeat
set cursor to watch
halftone
set cursor to hand
end mouseDown
on saveCard
set cursor to watch
checkError hyperScan("CopyCard")
if the optionKey is down then
put "The card has been copied. Go where you wish and paste it."
else
lock screen
go to last card
doMenu "Paste Card"
go back
go back
unlock screen
end if
end saveCard
on tabKey
togglePanel
end tabKey
on togglePanel
put not visible of button "Panel Box" into showHide
lock screen
set visible of button "Panel Box" to showHide
set visible of button "Help" to showHide
set visible of button "Portrait" to showHide
set visible of button "Landscape" to showHide
set visible of button "Halftone" to showHide
set visible of button "Effects" to showHide
unlock screen
end togglePanel
on wedge
global enhanceEdges
put zero into enhanceEdges
set cursor to watch
get hyperScan("GrayWedge")
if it is empty then auto
checkError it
end wedge
-- part 29 (button)
-- low flags: 00
-- high flags: 0004
-- rect: left=289 top=289 right=335 bottom=503
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Panel Box
----- HyperTalk script -----
on mouseDown
-- don't halftone
end mouseDown
-- part 30 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=301 top=296 right=328 bottom=333
-- title width / last selected line: 0
-- icon id / first selected line: 19137 / 19137
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Help
----- HyperTalk script -----
on mouseUp
push card
visual effect zoom open
go card "Halftone Help"
end mouseUp
on mouseDown
-- don't halftone
end mouseDown
-- part 31 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=340 top=296 right=328 bottom=372
-- title width / last selected line: 0
-- icon id / first selected line: 22989 / 22989
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Portrait
----- HyperTalk script -----
on mouseUp
go to card "Portrait"
end mouseUp
on mouseDown
-- don't halftone
end mouseDown
-- part 32 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=378 top=296 right=328 bottom=410
-- title width / last selected line: 0
-- icon id / first selected line: 21718 / 21718
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Landscape
----- HyperTalk script -----
on mouseUp
go to card "Landscape"
end mouseUp
on mouseDown
-- don't halftone
end mouseDown
-- part 33 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=418 top=296 right=328 bottom=450
-- title width / last selected line: 0
-- icon id / first selected line: 15217 / 15217
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Halftone
----- HyperTalk script -----
on mouseUp
go to card "Halftone"
end mouseUp
on mouseDown
-- don't halftone
end mouseDown
-- part 34 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=458 top=296 right=328 bottom=490
-- title width / last selected line: 0
-- icon id / first selected line: 28277 / 28277
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Effects
----- HyperTalk script -----
on mouseUp
go to card "Effects"
end mouseUp
on mouseDown
-- don't halftone
end mouseDown
-- part 35 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=8 top=316 right=338 bottom=78
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Save
----- HyperTalk script -----
on mouseDown
set hilite of me to true
saveCard
set hilite of me to false
end mouseDown
-- part 54 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=250 top=46 right=287 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 2
-- text size: 12
-- style flags: 0
-- line height: 15
-- part name: Directions 1
-- part 55 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=250 top=22 right=288 bottom=503
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 2
-- text size: 12
-- style flags: 0
-- line height: 15
-- part name: Directions 2
-- part 56 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=250 top=145 right=287 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 2
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Directions 3
-- part 57 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=250 top=33 right=287 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 2
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Directions 4
-- part 58 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=250 top=49 right=288 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 2
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Directions 5
-- part 13 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=241 top=158 right=184 bottom=272
-- title width / last selected line: 0
-- icon id / first selected line: 7937 / 7937
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Cross
-- part 59 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=91 top=21 right=287 bottom=421
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 2
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Directions 6
-- part 60 (button)
-- low flags: 80
-- high flags: 8003
-- rect: left=102 top=259 right=281 bottom=159
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Exit
-- part 61 (button)
-- low flags: 80
-- high flags: 8003
-- rect: left=434 top=259 right=281 bottom=491
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: OK
-- part 62 (button)
-- low flags: 80
-- high flags: 8003
-- rect: left=337 top=259 right=281 bottom=416
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Diffusion
-- part 64 (button)
-- low flags: 00
-- high flags: 0002
-- rect: left=83 top=318 right=336 bottom=117
-- title width / last selected line: 0
-- icon id / first selected line: 1300 / 1300
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
----- HyperTalk script -----
on mouseUp
---find out WHERE on the icon you clicked
put (item 1 of the clickLoc) - (item 1 of the Loc of me) into E
---if the click was on the left then
if E < 0 then
set icon of me to 1301
wait 1
set icon of me to 1300
push card
put PathWay() & "SN Feedback" into feedPath
set cursor to watch
visual effect dissolve fast
go stack feedPath
---if the click was on the right then
else if E > 0 then
set icon of me to 1302
wait 1
set icon of me to 1300
global navMenu
visual effect iris close to black
visual effect iris open
if navMenu is empty then put "Welcome" into navMenu
go card navMenu of stack "Support Navigator:Support Navigator"
end if
end mouseUp
Function PathWay
put the long name of stack "Home" into NewName
delete char 1 to 7 of NewName
repeat
if offset(":",NewName) is 0 then
exit repeat
else
put char 1 to offset(":",NewName) of NewName after NewPath
delete char 1 to offset(":",NewName) of NewName
end if
end repeat
return NewPath
end PathWay
-- part contents for card part 54
----- text -----
This is the Halftone card. The position of the white crossbar represents a brightness-and-contrast setting. HyperScan makes an initial guess about a good brightness-and-contrast setting for the scan.
For most scans, this default setting produces great results—save the image and you’re done!
• When you are finished reading,
click OK.
-- part contents for card part 55
----- text -----
You can refine the brightness-and-contrast setting as follows:
• Click in a new location (or drag the
white crossbar to a new place).
Moving the crossbar to the left decreases the contrast; moving it right increases the contrast. Moving the crossbar up increases the brightness; moving it down decreases the brightness.
• When you are finished making
adjustments, click OK.
-- part contents for card part 56
----- text -----
You also may want to apply halftone effects to the image, either to enhance it or to get special effects.
• Click the Effects icon to go the
Effects card.
-- part contents for card part 57
----- text -----
At this point, you could continue to adjust the brightness-and-contrast setting or to apply halftone effects.
In general, the Diffusion effect produces the best results, even for line art and other high-contrast originals.
• Click Diffusion to reapply the
Diffusion effect before going on
(otherwise, you’ll keep your version).• Click OK to continue.
-- part contents for card part 58
----- text -----
When you are satisfied with the results, you can save the image.
You can’t change a saved image, but you can copy it to other stacks, print it, or touch it up with the Paint tools.
(You can always return to this card to make more changes.)
• Click Save now to append a new
card with a copy of the image to
the end of the stack.
-- part contents for card part 59
----- text -----
That’s it! You now know how to use HyperScan. Your saved image is at the end of this stack. In general, follow these steps to do a scan:
1. Click either the Portrait icon or Landscape icon
on the first card to get started.
2. Click the Question Mark icon on any card for
information on how to proceed.
The on-line help also documents HyperScan’s shortcuts and advanced commands.